﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;

namespace ElectronicSelling.DataAccess
{
    public class Connection
    {
        public static SqlConnection GetConnection()
        {
            SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["connElectronic"].ConnectionString);
            //SqlConnection conn = new SqlConnection(@"");
            if (conn.State == ConnectionState.Open)
            {
                conn.Open();
                conn.Dispose();
            }
            return conn;
        }
    }
}